package com.path.planning.util.path.entity;

import cn.hutool.core.util.StrUtil;

public class RoadData extends PathTopologyData {
    /**
     * 路径ID
     */
    private Integer id;
    /**
     * 路径经纬度信息
     */
    private String geom;
    /**
     * 路径长度
     */
    private Double length;
    /**
     * 限高
     */
    private Double heightLimit;
    /**
     * 限重
     */
    private Double weightLimit;
    /**
     * 限宽
     */
    private Double widthLimit;
    /**
     * 限速
     */
    private Double speed;
    /**
     * 起点ID
     */
    private Integer source;
    /**
     * 终点ID
     */
    private Integer target;
    /**
     * 正向花费
     */
    private Double cost;
    /**
     * 逆向花费
     */
    private Double reverseCost;
    /**
     * 权重
     */
    private Double penalty;
    /**
     * 地方中文名称
     */
    private String byname;
    /**
     * 标准中文名称
     */
    private String obname;
    private String featcode;
    private String fc;
    private String lanes;
    private String dt;
    private String toll;
    private String df;
    private String fw;
    private String nr;
    private String rstruct;
    private String rdnum;
    private String datatype;

    @Override
    public Integer getId() {
        return this.id;
    }

    @Override
    public String getGeom() {
        return this.geom;
    }

    @Override
    public Integer getSource() {
        return this.source;
    }

    @Override
    public Integer getTarget() {
        return this.target;
    }

    @Override
    public Double getCost() {
        return this.cost;
    }

    @Override
    public Double getReverseCost() {
        return this.reverseCost;
    }

    @Override
    public Double getSpeed() {
        return this.speed;
    }

    @Override
    public Double getHeightLimit() {
        return this.heightLimit;
    }

    @Override
    public Double getWidthLimit() {
        return this.widthLimit;
    }

    @Override
    public Double getWeightLimit() {
        return this.weightLimit;
    }

    @Override
    public Double getDepthLimit() {
        return null;
    }

    @Override
    public Double getPenalty() {
        return this.penalty;
    }

    @Override
    public String getPathName() {
        return StrUtil.isNotBlank(this.byname) ? this.byname : this.obname;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setGeom(String geom) {
        this.geom = geom;
    }

    public Double getLength() {
        return length;
    }

    public void setLength(Double length) {
        this.length = length;
    }

    public void setHeightLimit(Double heightLimit) {
        this.heightLimit = heightLimit;
    }

    public void setWeightLimit(Double weightLimit) {
        this.weightLimit = weightLimit;
    }

    public void setWidthLimit(Double widthLimit) {
        this.widthLimit = widthLimit;
    }

    public void setSpeed(Double speed) {
        this.speed = speed;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public void setTarget(Integer target) {
        this.target = target;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }

    public void setReverseCost(Double reverseCost) {
        this.reverseCost = reverseCost;
    }

    public void setPenalty(Double penalty) {
        this.penalty = penalty;
    }

    public String getByname() {
        return byname;
    }

    public void setByname(String byname) {
        this.byname = byname;
    }

    public String getObname() {
        return obname;
    }

    public void setObname(String obname) {
        this.obname = obname;
    }

    public String getFeatcode() {
        return featcode;
    }

    public void setFeatcode(String featcode) {
        this.featcode = featcode;
    }

    public String getFc() {
        return fc;
    }

    public void setFc(String fc) {
        this.fc = fc;
    }

    public String getLanes() {
        return lanes;
    }

    public void setLanes(String lanes) {
        this.lanes = lanes;
    }

    public String getDt() {
        return dt;
    }

    public void setDt(String dt) {
        this.dt = dt;
    }

    public String getToll() {
        return toll;
    }

    public void setToll(String toll) {
        this.toll = toll;
    }

    public String getDf() {
        return df;
    }

    public void setDf(String df) {
        this.df = df;
    }

    public String getFw() {
        return fw;
    }

    public void setFw(String fw) {
        this.fw = fw;
    }

    public String getNr() {
        return nr;
    }

    public void setNr(String nr) {
        this.nr = nr;
    }

    public String getRstruct() {
        return rstruct;
    }

    public void setRstruct(String rstruct) {
        this.rstruct = rstruct;
    }

    public String getRdnum() {
        return rdnum;
    }

    public void setRdnum(String rdnum) {
        this.rdnum = rdnum;
    }

    public String getDatatype() {
        return datatype;
    }

    public void setDatatype(String datatype) {
        this.datatype = datatype;
    }

    @Override
    public String toString() {
        return "RoadData{" +
                "id='" + id + '\'' +
                ", geom='" + geom + '\'' +
                ", length=" + length +
                ", heightLimit=" + heightLimit +
                ", weightLimit=" + weightLimit +
                ", widthLimit=" + widthLimit +
                ", speed=" + speed +
                ", source=" + source +
                ", target=" + target +
                ", cost=" + cost +
                ", reverseCost=" + reverseCost +
                ", penalty=" + penalty +
                ", byname='" + byname + '\'' +
                ", obname='" + obname + '\'' +
                ", featcode='" + featcode + '\'' +
                ", fc='" + fc + '\'' +
                ", lanes='" + lanes + '\'' +
                ", dt='" + dt + '\'' +
                ", toll='" + toll + '\'' +
                ", df='" + df + '\'' +
                ", fw='" + fw + '\'' +
                ", nr='" + nr + '\'' +
                ", rstruct='" + rstruct + '\'' +
                ", rdnum='" + rdnum + '\'' +
                ", datatype='" + datatype + '\'' +
                '}';
    }
}
